
 <form id="ExampleBootstrapValidationForm" method="post" action="__URL__/uptAct" class="form-horizontal" enctype="multipart/form-data">
        <input type="hidden" name="audience_id" value="{$audience.audience_id}" />
        <fieldset>
             <div class="form-group">
                  <label class="col-lg-3 control-label">用户名<span style="color:red"> * </span></label>
                  <div class="col-lg-5">
                       <input type="text" class="form-control must" id="name" type="text" name="audience_username" value="{$audience.audience_username}" />
                  </div>
             </div>
             <div class="form-group">
                  <label class="col-lg-3 control-label">密码<span style="color:red"> * </span></label>
                  <div class="col-lg-5">
                       <input type="text" class="form-control must text-input" id="name" type="text" name="audience_pwd" value="{$audience.audience_pwd}" />
                  </div>
             </div>
             <div class="form-group">
                  <label class="col-lg-3 control-label">昵称<span style="color:red"> * </span></label>
                  <div class="col-lg-5">
                       <input type="text" class="form-control must text-input" id="name" type="text" name="audience_name" value="{$audience.audience_name}" />
                  </div>
             </div>
            <div class="form-group">
                  <label class="col-lg-3 control-label">昵称首字母<span style="color:red"> * </span></label>
                  <div class="col-lg-5">
                       <input type="text" class="form-control must text-input" id="name" type="text" name="audience_nick" value="{$audience.audience_nick}" />
                  </div>
             </div>
             <div class="form-group">
                <label class="col-lg-3 control-label">所属部门</label>
                <div class="col-lg-5">                    
                  <select class="form-control" tabindex="2" name="audience_department" id="{$audience.audience_department}">
                    <foreach name="department" item="value">
                      <option class="option" value="{$value.department_id}">{$value.department_name}</option>
                    </foreach>                          
                  </select>
                </div>
             </div>
             <input type="hidden" name="old_department" value="{$audience.audience_department}"  />
             <div class="form-group">
                  <label class="col-lg-3 control-label">职位</label>
                  <div class="col-lg-5">
                       <input type="text" class="form-control must text-input" id="name" type="text" name="audience_position" value="{$audience.audience_position}" />
                  </div>
             </div>
             <div class="form-group">
                  <label class="col-lg-3 control-label">手机</label>
                  <div class="col-lg-5">
                       <input type="text" class="form-control must text-input" id="name" type="text" name="audience_tel" value="{$audience.audience_tel}" />
                  </div>
             </div>
             <div class="form-group">
                  <label class="col-lg-3 control-label">邮箱</label>
                  <div class="col-lg-5">
                       <input type="text" class="form-control must text-input" id="name" type="text" name="audience_email" value="{$audience.audience_email}" />
                  </div>
             </div>
             <div class="form-group">
                 <label class="col-lg-3 control-label">使用状态</label> 
                 <div class="col-lg-5">
                     
                      <div class="radio">                                   
                            <input type="radio" name="audience_state" value="1" /> 开启                                   
                      </div>
                      <div class="radio">                                   
                            <input type="radio" name="audience_state" value="0" /> 关闭                                   
                      </div>
                </div>                                          
             </div>

             <div class="form-group">
                  <label class="col-lg-3 control-label">直属上司</label>
                  <div class="col-lg-5">
                       <input type="text" class="form-control must text-input" id="leader" type="text" name="leader_id" value="{$audience.leader_id}" onclick="open_audience('radio','leader_id')" />
                  </div>
             </div>
             <div class="form-group">
                  <label class="col-lg-3 control-label">头像</label>
                  <div class="col-lg-5">
                        <img src="__ROOT__/{$audience.audience_portrait}" width="100" />
                        <br/> 重新上传
                       <input class="form-control must text-input" id="leader" type="file" name="audience_portrait" />
                  </div>
             </div>
             <div class="form-group">
                <label class="col-lg-3 control-label">所属权限</label>
                <div class="col-lg-5">
                    <select class="form-control" tabindex="2" name="audience_rights">
                        <option value="1">普通员工</option>
                        <option value="2">一般管理员</option>
                        <option value="3">超级管理员</option>
                    </select>
                </div>
            </div>
            
            <!--  李记辉  添加于2015/01/26 -->
            <div class="form-group">
                <label class="col-lg-3 control-label">所属会议类型分组</label>
                <div class="col-lg-5">
                    <select class="form-control" tabindex="2" id="au_meet_cate" name="category_id">
                        <foreach name="type" item="value" >
                            <option value="{$value.category_id}">{$value.category_name}</option>
                        </foreach>
                    </select>
                </div>
            </div>
            <!--  李记辉  添加于2015/01/26 -->

		        <div class="form-group">
              <div class="col-lg-9 col-lg-offset-3">                                  
                <input class="btn btn-primary button" id="submit"  type="submit" value="修改" />
              </div>
            </div>            
    </fieldset>
    <div class="clear"></div>
</form>	
<div class="clear"></div>

<!--直属上司-->
<div class="leader_box" style="width:100%;display:none;opacity:0.3;position:absolute;top:0;bottom:0;z-index:10"></div>

<div id="check_leader"  style="width:300px;display:none;position:absolute;top:200px;left:600px;z-index:100;border-radius:10px;">
    <span id="close" style="float:right;margin-right:10px;font-size:20px;cursor:pointer">x</span>
    <h3>选择直属上司</h3>
    <div id="div_table" >
        
    </div>
</div>


<script type="text/javascript">
$("body").css("background","none");
$("#body-wrapper").css("background","none");
$('input[name="audience_state"]').each(function(index, element) {
    if($(this).val()=='{$audience.audience_state}')
	$(this).attr("checked",true);
});
$('[name="audience_rights"]').val('{$audience.audience_rights}');
$('[name="audience_department"]').val('{$audience.audience_department}');

  var option  = document.getElementsByClassName("option");
  for(var i=0;i<option.length;i++){
    if(option[i].value==option[i].parentNode.getAttribute("id")){
      option[i].setAttribute("selected","selected");
    }
  } 


  $("#au_meet_cate").val('{$amc.category_id}');
</script>
<!--直属上司选择控制-->
<!-- <script type="text/javascript">
  $("#leader").focus(function(){
    
    $.ajax({
      url:"__URL__/forAct2",
      data:{"a":a},
      type:"post",
      success:function(data){
        $(".leader_box").css({background:"#313940",display:"block"});
        $("#check_leader").css({display:"block",background:"white"});
        $("#div_table").html(data);
        alert(data);
        
      }
    });
  });
  
</script> -->
